/**
 * 
 */
package dbVSguiConnection;
import java.util.ArrayList;

import runnable_functions.ReferedObject;

import details.*;
/**
 * @author Tami
 *
 */
/**all functions used by gui to pass queries / transactions to the DB layer
* for each method, the corresponding method in GuiUpdatesInterface, the one that
* should be called when finishing, is mentioned in the javadoc**/
interface GuiCallDb_Interface {
	
		void connectToDataBase();
	
	 void goToHome();
	
	
	 void getArtistSearchResults(String name,int numOfResults);/* to add the mix searches*/
	 void getAdvanceCdSearchResults(String titleToSearch ,String performerToSearch,String genreToSearch,int yearFrom,int yearTo,int numOfResults);
	 void getAdvanceSongSearchReasults(String titleToSearch ,String artistToSearch,String wordsToSearch,int numOfResults);
	 //void getYearRangeCdSearchResult(int yearFromSearch ,int yearToSearch,int numOfResults);
	 /* the moment the person wants the target info it means that its view is +1*/
	 void getArtistAllInfo(int artist_id);
	 void getSongAllInfo(int songId) ;
	 void getCdAllInfo(Cd cd);

	/**User Login and Create**/
	 void createNewUser(String user_name,String password);
	 //void checkUsernameValidity(String user_name);
	 void logIn(String user_name,String password);
	 void deleteUser(String user_name, String password,User curr_user);
	 void changePassword(String user_name,String oldPass,String newPass);
	
	/**Delete From DB**/
	 /* delete song or cd or artist or genre or lyric*/
	 void delete(ReferedObject objType,String identifier,String username);
	 void deleteEmptyCds();
	 void deleteCommentSong(User user,Comment comment,int song_id);

	 
	/**add and edit  DB**/
	 
	 void addCd(String cd_name,String genre,String performer,int releaseYear,ArrayList<Track> tracks);/*without length*/
	 //void createArtist(String name,String last_name,boolean addTo,int addToId);
	 //void createGenre(String genre_name);
	 //void createSong(String song_name,String genre_name,boolean addTo,int addToId);
	 void addLyricToSong(String content, int song_id,String curr_user) ;
	 void addCommenToSong(User user,String comment,String DATETIM,int song_id);
	 void like_unlike(Target target,String target_id,User user,Like l);
	 
	 void editCd(String cd_id,String changed_name,int changed_cdYear,String changed_performer,ArrayList<Track> changedCdTracks,String curr_user);
	 /* call if you want to edit lirerally : genre_name,sobg_name,artist_name,lyricof song ... with songId as
	  * an identifier.# but not cd , fir cd edit call editCd function*/
	  
	void editRest(String identifier,ReferedObject refObj,String changed_name,String curr_user);
	 
	 void getIfUserLike(Target target,String target_id,int user_id);
	 
	 
	/**update database**/
	 void updateDB(String update_file_name);
	 
	

}
